package com.cskaoyan.service;


import com.cskaoyan.bean.bo.*;
import com.cskaoyan.bean.bo.wx.WxBasicQueryBo;
import com.cskaoyan.bean.bo.wx.WxCouponMylistBo;
import com.cskaoyan.bean.pojo.*;
import com.cskaoyan.bean.vo.*;
import com.cskaoyan.bean.vo.wx.GrouponVo;
import com.cskaoyan.bean.vo.wx.WxBaseRespVo;
import com.cskaoyan.bean.vo.wx.WxGrouponMyVo;
import com.cskaoyan.bean.vo.wx.WxMyCouponMylistVo;

import java.util.List;

/**
 * @author: lsy
 * @class: PromotionService
 */
public interface PromotionService {

    /**
     * @author: lsy
     * @title: queryAds
     * @description: 根据分页排序条件查询所有广告信息
     * adListBo.sort != null, adListBo.order != null 且合法
     * @param: [adListBo]
     * @return: com.cskaoyan.bean.vo.AdListVo
     */
    AdListVo queryAds(AdListBo adListBo);

    /**
     * @author: lsy
     * @title: changeAd
     * @description: 编辑广告内容
     * @param: [adUpdateBo]
     * @return: com.cskaoyan.bean.vo.AdUpdateVo
     */
    AdUpdateVo changeAd(AdUpdateBo adUpdateBo);

    /**
     * @author: lsy
     * @title: queryCoupons
     * @description: 根据分页条件查询所有优惠券信息
     * couponListBo.sort != null, couponListBo.order != null 且合法
     * @param: [baseQueryBo]
     * @return: com.cskaoyan.bean.vo.CouponListVo
     */
    CouponListVo queryCoupons(CouponListBo couponListBo);

   

    /**
     * @author: lsy
     * @title: addCoupon
     * @description: 添加商品, coupon.name不能为null
     * @param: [couponCreateBo]
     * @return: int
     */
    int addCoupon(Coupon coupon);

    /**
     * @author: lsy
     * @title: queryTopics
     * @description: 分页查询专题信息
     * @param: [topicListBo]
     * @return: com.cskaoyan.bean.vo.TopicListVo
     */
    TopicListVo queryTopics(TopicListBo topicListBo);

    /**
     * @author: lsy
     * @title: changeTopic
     * @description: 修改topic内容
     * @param: [topic]
     * @return: int
     */
    int changeTopic(Topic topic);

    /**
     * @author: lsy
     * @title: addTopic
     * @description: 添加专题信息
     * @param: [topic]
     * @return: int
     */
    int addTopic(Topic topic);

    /**
     * @author: lsy
     * @title: queryGrouponRules
     * @description: 查询团购规则
     * @param: [grouponListBo]
     * @return: com.cskaoyan.bean.vo.GrouponListVo
     */
    GrouponListVo queryGrouponRules(GrouponListBo grouponListBo);

    /**
     * @author: lsy
     * @title: changeGrouponRules
     * @description: 修改团购规则
     * @param: [grouponRules]
     * @return: int
     */
    int changeGrouponRules(GrouponRules grouponRules);

    /**
     * @author: lsy
     * @title: queryCoupon
     * @description: 根据优惠券id查询优惠券信息
     * @param: [id]
     * @return: com.cskaoyan.bean.pojo.Coupon
     */
    Coupon queryCoupon(int id);

    /**
     * @author: lsy
     * @title: changeCoupon
     * @description: 修改优惠券信息
     * @param: [coupon]
     * @return: int
     */
    int changeCoupon(Coupon coupon);

    /**
     * @author: lsy
     * @title: addGrouponRules
     * @description: 添加团购规则
     * @param: [grouponRules]
     * @return: int
     */
    int addGrouponRules(GrouponRules grouponRules);

    /**
     * @author: lsy
     * @title: queryGroupon
     * @description: 查询团购活动
     * @param: [grouponListRecordBo, orderIdList]
     * @return: com.cskaoyan.bean.vo.GrouponListRecordVo
     */
    GrouponListRecordVo queryGroupon(GrouponListRecordBo grouponListRecordBo, List<Integer> orderIdList);

    /**
     * @author: lsy
     * @title: addAd
     * @description: 添加一条广告
     * @param: [ad]
     * @return: int
     */
    int addAd(Ad ad);

    /**
     * @author: lsy
     * @title: queryUsersByCouponIdAndUserIdAndStatus
     * @description:
     * @param: [couponListuserBo]
     * @return: com.cskaoyan.bean.vo.CouponListuserVo
     */
    CouponListuserVo queryUsersByCouponIdAndUserIdAndStatus(CouponListuserBo couponListuserBo);

    /**
     * @author: lsy
     * @title: queryAllAds
     * @description: 查询所有广告
     * @param: []
     * @return: java.util.List<com.cskaoyan.bean.pojo.Ad>
     */
    List<Ad> queryAllAds();

    /**
     * @author: lsy
     * @title: queryAllCoupons
     * @description: 查询所有优惠券信息
     * @param: []
     * @return: java.util.List<com.cskaoyan.bean.pojo.Coupon>
     */
    List<Coupon> queryAllCoupons();
    /**
     * @author: lsy
     * @title: queryAllGroupons
     * @description: 查询所有团购信息
     * @param: []
     * @return: java.util.List<com.cskaoyan.bean.vo.GrouponVo>
     */
    List<GrouponVo> queryAllGroupons();

    /**
     * @author: lsy
     * @title: queryAllTopics
     * @description: 查询所有topic信息
     * @param: []
     * @return: java.util.List<com.cskaoyan.bean.pojo.Topic>
     */
    List<Topic> queryAllTopics();

    /**
     * @author: lsy
     * @title: queryWxCoupons
     * @description: 微信端根据条件查询用户的优惠券
     * @param: [wxCouponMylistBo]
     * @return: void
     */
    WxMyCouponMylistVo queryWxCouponsByUserId(WxCouponMylistBo wxCouponMylistBo, int userId);

    /**
     * @author: lsy
     * @title: addWxCouponByCode
     * @description: 微信端添加用户的优惠券
     * @param: [code]
     * @return: int
     */
    int addWxCouponByCode(String code, int userId);

    /**
     * @author: lsy
     * @title: queryCouponUserByCouponId
     * @description: 根据couponId查询用户的优惠券信息
     * @param: [couponId]
     * @return: com.cskaoyan.bean.pojo.CouponUser
     */
    CouponUser queryCouponUserByCouponIdAndUserId(int couponId, int userId);

    /**
     * @author: lsy
     * @title: addCouponUserByUserIdAndCoupon
     * @description: 根据userId和coupon内容添加一个couponUSER
     * @param: [coupon, id]
     * @return: int
     */
    int addCouponUserByUserIdAndCoupon(Coupon coupon, Integer id);

    /**
     * @author: lsy
     * @title: queryCouponsByPage
     * @description: 根据分页条件查询所有coupon信息
     * @param: [wxBasicQueryBo]
     * @return: com.cskaoyan.bean.vo.wx.WxBaseRespVo<com.cskaoyan.bean.pojo.Coupon>
     */
    WxBaseRespVo<Coupon> queryCouponsByPage(WxBasicQueryBo wxBasicQueryBo);


    WxBaseRespVo<WxGrouponMyVo> queryGrouponByUserIdAndShowType(int showType, int userId);

    /**
     * @author: lsy
     * @title: queryGrouponByUserIdAndGrouponId
     * @description: 根据团购id和用户id查询团购信息
     * @param: [grouponId]
     * @return: com.cskaoyan.bean.pojo.Groupon
     */
    Groupon queryGrouponByUserIdAndGrouponId(int grouponId, int userId);

    /**
     * @author: lsy
     * @title: queryGrouponByOrderId
     * @description: 根据orderId查询所有的groupon信息
     * @param: [orderId]
     * @return: java.util.List<com.cskaoyan.bean.pojo.Groupon>
     */
    List<Groupon> queryGrouponByOrderId(int orderId);
    
    /**
     * @author: lsy
     * @title: queryGrouponByGrouponId
     * @description: 根据grouponid查询
     * @param: [grouponId]
     * @return: java.util.List<com.cskaoyan.bean.pojo.Groupon>
     */
    List<Groupon> queryGrouponByGrouponId(int grouponId);

    /**
     * @author: lsy
     * @title: queryGrouponById
     * @description: 根据id查询团购信息
     * @param: [id]
     * @return: com.cskaoyan.bean.pojo.Groupon
     */
    Groupon queryGrouponById(int id);

    /**
     * @author: lsy
     * @title: querygrouponRulesById
     * @description: 根据团购规则id查找信息
     * @param: [id]
     * @return: com.cskaoyan.bean.pojo.GrouponRules
     */
    GrouponRules querygrouponRulesById(int id);

    /**
     * @author: lsy
     * @title: queryCouponUserByUserId
     * @description: 根据用户id查找couponUser List
     * @param: [userId]
     * @return: java.util.List<com.cskaoyan.bean.pojo.Coupon>
     */
    List<CouponUser> queryCouponUserByUserId(int userId);

    /**
     * @author: lsy
     * @title: queryCouponByCouponId
     * @description: 根据couponId查询coupon信息
     * @param: [couponId]
     * @return: com.cskaoyan.bean.pojo.Coupon
     */
    Coupon queryCouponById(int id);

    List<Groupon> queryGroupons();

    int addGroupon(Groupon groupon);

    int changeCouponUserByCouponIdAndUserId(CouponUser couponUser, int couponId, int userId);

}
